<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles-extras" prefix="tilesx" %>
<div class="nav-container" >
<nav class="navbar navbar-default" role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <c:set var="navBrand"><tiles:getAsString name="navbar-brand"/></c:set>
      <a class="navbar-brand active" href="<c:url value="${fn:substringAfter(navBrand,'|')}"/>">${fn:substringBefore(navBrand,"|")}</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
      	<tilesx:useAttribute id="navbarLeftList" name="navbar-left" classname="java.util.List" />
      	<c:forEach items="${navbarLeftList}" var="item" varStatus="status">
	        <li class=""><a href="<c:url value="${fn:substringAfter(item,'|')}"/>">${fn:substringBefore(item,"|")}</a></li>
		</c:forEach>
      </ul>
      <ul class="nav navbar-nav navbar-right">
      	<tilesx:useAttribute id="navbarRightList" name="navbar-right" classname="java.util.List" />
      	<c:forEach items="${navbarRightList}" var="item" varStatus="status">
	        <li class=""><a href="<c:url value="${fn:substringAfter(item,'|')}"/>">${fn:substringBefore(item,"|")}</a></li>
		</c:forEach>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

</div>